/**
 * Author(s): xuming.Wong <xuming.Wong@gmail.com>
 */
#ifndef __PQ_PacketFactoryManager_H__
#define __PQ_PacketFactoryManager_H__

#include "PacketFactory.h"

namespace PQNet
{
	enum PacketType
	{
		Packet_Type_AskLogin,
		Packet_Type_Count
	};

	class PacketFactoryManager
	{
	protected:
		PacketFactoryManager();
	public:
		static PacketFactoryManager& getSingleton()
		{
			static PacketFactoryManager inst;
			return inst;
		}

		void init();

		void addFactory(PacketFactory* factory);

	protected:
		PacketFactory* _factories[Packet_Type_Count];
	};

}
#endif
